#打开文件
file = open("b.txt","w",encoding="utf-8")
list = [
    "今天是个好日子",
    "明天也是个好日子",
    "后天也是个好日子",
    "大家好，中国！"  
]

list = "\n".join(list)  #推导式list = [ele + "\n" for ele in list]
file.writelines(list)

file.close()